Javascript Properties

Description

Event handlers to add custom behaviors to the Grid. Behaviors can be added using Action Javascript, JavaScript, or server-side Xbasic.

Discussion

The Javascript properties is a list of event handlers that can be used to extend your application with custom behaviors. For example, the onClick event for a button could be used to display a report or the onChange event for a dropdown box could be used to update the choices in another dropdown.

Event handler properties correspond to the matching HTML inline event handler for the control. All event handlers are passed an event object in a variable called event. The event object is the object passed to the event handler by the browser. For keyboard events, event will contain information about what keys have been pressed. See Event (MDN Web Docs) for more information about the event object.

While all event handlers may be listed, some controls do not fire the event handler. For example, a Button does not fire the onChange event.

Javascript event handlers do not support touch devices. If you need to implement an app with touch support, use the UX Component.

Name
Description
onBlur Event

Fires when the control loses focus.

onChange Event

Fires when the control's value changes.

onClick Event

Fires when the control is clicked.

onDblClick Event

Fires when the user double-clicks a control.

onFocus Event

Fires when the control is given focus.

onKeyDown Event

Fires when the user presses a key down on the keyboard while the control has focus.

onKeyPress Event

Fires when the user presses a key that produces a character value while the control has focus.

onKeyUp Event

Fires when the user releases a key after it has been pressed and the control has focus.

onMouseDown Event

Fires when the user presses a mouse button while the mouse cursor is over the control.

onMouseMove Event

Fires when the user moves the mouse while the mouse cursor is over the control.

onMouseOut Event

Fires when the user moves the mouse cursor off of the control.

onMouseOver Event

Fires when the user moves the mouse cursor over the control.

onMouseUp Event

Fires when the user releases the mouse button while the mouse cursor is over the control.

onSelect Event

Fires when the user selects text in the control.